# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V34.Model.CreativeAsset do
  @moduledoc """
  Creative Asset.

  ## Attributes

  *   `additionalSizes` (*type:* `list(GoogleApi.DFAReporting.V34.Model.Size.t)`, *default:* `nil`) - Additional sizes associated with this creative asset. HTML5 asset generated by compatible software such as GWD will be able to support more sizes this creative asset can render.
  *   `positionLeftUnit` (*type:* `String.t`, *default:* `nil`) - Offset left unit for an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.
  *   `size` (*type:* `GoogleApi.DFAReporting.V34.Model.Size.t`, *default:* `nil`) - Size associated with this creative asset. This is a required field when applicable; however for IMAGE and FLASH_INPAGE, creatives if left blank, this field will be automatically set using the actual size of the associated image asset. Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
  *   `verticallyLocked` (*type:* `boolean()`, *default:* `nil`) - Whether the asset is vertically locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.
  *   `positionTopUnit` (*type:* `String.t`, *default:* `nil`) - Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA.
  *   `duration` (*type:* `integer()`, *default:* `nil`) - Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.
  *   `zipFilename` (*type:* `String.t`, *default:* `nil`) - File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER.
  *   `fileSize` (*type:* `String.t`, *default:* `nil`) - File size associated with this creative asset. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT.
  *   `position` (*type:* `GoogleApi.DFAReporting.V34.Model.OffsetPosition.t`, *default:* `nil`) - Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA.
  *   `durationType` (*type:* `String.t`, *default:* `nil`) - Duration type for which an asset will be displayed. Applicable to the following creative types: all RICH_MEDIA.
  *   `customStartTimeValue` (*type:* `integer()`, *default:* `nil`) - Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0.
  *   `hideSelectionBoxes` (*type:* `boolean()`, *default:* `nil`) - Whether to hide selection boxes flag for an asset. Applicable to the following creative types: all RICH_MEDIA.
  *   `zipFilesize` (*type:* `String.t`, *default:* `nil`) - Size of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER.
  *   `childAssetType` (*type:* `String.t`, *default:* `nil`) - Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID.
  *   `artworkType` (*type:* `String.t`, *default:* `nil`) - Artwork type of rich media creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.
  *   `bitRate` (*type:* `integer()`, *default:* `nil`) - Detected bit-rate for audio or video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `assetIdentifier` (*type:* `GoogleApi.DFAReporting.V34.Model.CreativeAssetId.t`, *default:* `nil`) - Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT.
  *   `collapsedSize` (*type:* `GoogleApi.DFAReporting.V34.Model.Size.t`, *default:* `nil`) - Size of an asset when collapsed. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
  *   `pushdownDuration` (*type:* `number()`, *default:* `nil`) - Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive.
  *   `audioSampleRate` (*type:* `integer()`, *default:* `nil`) - Audio sample bit rate in hertz. This is a read-only field. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `politeLoad` (*type:* `boolean()`, *default:* `nil`) - Whether this asset is used as a polite load asset.
  *   `audioBitRate` (*type:* `integer()`, *default:* `nil`) - Audio stream bit rate in kbps. This is a read-only field. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `windowMode` (*type:* `String.t`, *default:* `nil`) - Window mode options for flash assets. Applicable to the following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING, RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and RICH_MEDIA_INPAGE_FLOATING.
  *   `idDimensionValue` (*type:* `GoogleApi.DFAReporting.V34.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the asset. This is a read-only, auto-generated field.
  *   `alignment` (*type:* `String.t`, *default:* `nil`) - Possible alignments for an asset. This is a read-only field. Applicable to the following creative types: RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL .
  *   `offset` (*type:* `GoogleApi.DFAReporting.V34.Model.OffsetPosition.t`, *default:* `nil`) - Offset position for an asset in collapsed mode. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, only applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
  *   `progressiveServingUrl` (*type:* `String.t`, *default:* `nil`) - Progressive URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
  *   `active` (*type:* `boolean()`, *default:* `nil`) - Whether the video or audio asset is active. This is a read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `backupImageExit` (*type:* `GoogleApi.DFAReporting.V34.Model.CreativeCustomEvent.t`, *default:* `nil`) - Exit event configured for the backup image. Applicable to the following creative types: all RICH_MEDIA.
  *   `mediaDuration` (*type:* `number()`, *default:* `nil`) - Detected duration for audio or video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `transparency` (*type:* `boolean()`, *default:* `nil`) - Whether the asset is transparent. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets.
  *   `expandedDimension` (*type:* `GoogleApi.DFAReporting.V34.Model.Size.t`, *default:* `nil`) - Detected expanded dimension for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
  *   `hideFlashObjects` (*type:* `boolean()`, *default:* `nil`) - Whether to hide Flash objects flag for an asset. Applicable to the following creative types: all RICH_MEDIA.
  *   `originalBackup` (*type:* `boolean()`, *default:* `nil`) - Whether the backup asset is original or changed by the user in Campaign Manager. Applicable to the following creative types: all RICH_MEDIA.
  *   `companionCreativeIds` (*type:* `list(String.t)`, *default:* `nil`) - List of companion creatives assigned to an in-stream video creative asset. Acceptable values include IDs of existing flash and image creatives. Applicable to INSTREAM_VIDEO creative type with dynamicAssetSelection set to true.
  *   `role` (*type:* `String.t`, *default:* `nil`) - Role of the asset in relation to creative. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. This is a required field. PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE, DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple primary assets), and all VPAID creatives. BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA, and all VPAID creatives. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE creatives. OTHER refers to assets from sources other than Campaign Manager, such as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID creatives. PARENT_VIDEO refers to videos uploaded by the user in Campaign Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO creatives. TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO creatives. ALTERNATE_VIDEO refers to the Campaign Manager representation of child asset videos from Studio, and is applicable to VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within Campaign Manager. For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO assets that are marked active serve as backup in case the VPAID creative cannot be served. Only PARENT_VIDEO assets can be added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO creative. PARENT_AUDIO refers to audios uploaded by the user in Campaign Manager and is applicable to INSTREAM_AUDIO creatives. TRANSCODED_AUDIO refers to audios transcoded by Campaign Manager from PARENT_AUDIO assets and is applicable to INSTREAM_AUDIO creatives. 
  *   `flashVersion` (*type:* `integer()`, *default:* `nil`) - Flash version of the asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
  *   `orientation` (*type:* `String.t`, *default:* `nil`) - Orientation of video asset. This is a read-only, auto-generated field.
  *   `actionScript3` (*type:* `boolean()`, *default:* `nil`) - Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
  *   `startTimeType` (*type:* `String.t`, *default:* `nil`) - Initial wait time type before making the asset visible. Applicable to the following creative types: all RICH_MEDIA.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Numeric ID of this creative asset. This is a required field and should not be modified. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT.
  *   `horizontallyLocked` (*type:* `boolean()`, *default:* `nil`) - Whether the asset is horizontally locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.
  *   `zIndex` (*type:* `integer()`, *default:* `nil`) - zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive.
  *   `detectedFeatures` (*type:* `list(String.t)`, *default:* `nil`) - List of feature dependencies for the creative asset that are detected by Campaign Manager. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. Applicable to the following creative types: HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
  *   `pushdown` (*type:* `boolean()`, *default:* `nil`) - Whether the asset pushes down other content. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable when the asset offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height.
  *   `streamingServingUrl` (*type:* `String.t`, *default:* `nil`) - Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
  *   `sslCompliant` (*type:* `boolean()`, *default:* `nil`) - Whether the asset is SSL-compliant. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT.
  *   `mimeType` (*type:* `String.t`, *default:* `nil`) - Detected MIME type for audio or video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
  *   `frameRate` (*type:* `number()`, *default:* `nil`) - Video frame rate for video asset in frames per second. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
  *   `displayType` (*type:* `String.t`, *default:* `nil`) - Type of rich media asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalSizes => list(GoogleApi.DFAReporting.V34.Model.Size.t()) | nil,
          :positionLeftUnit => String.t() | nil,
          :size => GoogleApi.DFAReporting.V34.Model.Size.t() | nil,
          :verticallyLocked => boolean() | nil,
          :positionTopUnit => String.t() | nil,
          :duration => integer() | nil,
          :zipFilename => String.t() | nil,
          :fileSize => String.t() | nil,
          :position => GoogleApi.DFAReporting.V34.Model.OffsetPosition.t() | nil,
          :durationType => String.t() | nil,
          :customStartTimeValue => integer() | nil,
          :hideSelectionBoxes => boolean() | nil,
          :zipFilesize => String.t() | nil,
          :childAssetType => String.t() | nil,
          :artworkType => String.t() | nil,
          :bitRate => integer() | nil,
          :assetIdentifier => GoogleApi.DFAReporting.V34.Model.CreativeAssetId.t() | nil,
          :collapsedSize => GoogleApi.DFAReporting.V34.Model.Size.t() | nil,
          :pushdownDuration => number() | nil,
          :audioSampleRate => integer() | nil,
          :politeLoad => boolean() | nil,
          :audioBitRate => integer() | nil,
          :windowMode => String.t() | nil,
          :idDimensionValue => GoogleApi.DFAReporting.V34.Model.DimensionValue.t() | nil,
          :alignment => String.t() | nil,
          :offset => GoogleApi.DFAReporting.V34.Model.OffsetPosition.t() | nil,
          :progressiveServingUrl => String.t() | nil,
          :active => boolean() | nil,
          :backupImageExit => GoogleApi.DFAReporting.V34.Model.CreativeCustomEvent.t() | nil,
          :mediaDuration => number() | nil,
          :transparency => boolean() | nil,
          :expandedDimension => GoogleApi.DFAReporting.V34.Model.Size.t() | nil,
          :hideFlashObjects => boolean() | nil,
          :originalBackup => boolean() | nil,
          :companionCreativeIds => list(String.t()) | nil,
          :role => String.t() | nil,
          :flashVersion => integer() | nil,
          :orientation => String.t() | nil,
          :actionScript3 => boolean() | nil,
          :startTimeType => String.t() | nil,
          :id => String.t() | nil,
          :horizontallyLocked => boolean() | nil,
          :zIndex => integer() | nil,
          :detectedFeatures => list(String.t()) | nil,
          :pushdown => boolean() | nil,
          :streamingServingUrl => String.t() | nil,
          :sslCompliant => boolean() | nil,
          :mimeType => String.t() | nil,
          :frameRate => number() | nil,
          :displayType => String.t() | nil
        }

  field(:additionalSizes, as: GoogleApi.DFAReporting.V34.Model.Size, type: :list)
  field(:positionLeftUnit)
  field(:size, as: GoogleApi.DFAReporting.V34.Model.Size)
  field(:verticallyLocked)
  field(:positionTopUnit)
  field(:duration)
  field(:zipFilename)
  field(:fileSize)
  field(:position, as: GoogleApi.DFAReporting.V34.Model.OffsetPosition)
  field(:durationType)
  field(:customStartTimeValue)
  field(:hideSelectionBoxes)
  field(:zipFilesize)
  field(:childAssetType)
  field(:artworkType)
  field(:bitRate)
  field(:assetIdentifier, as: GoogleApi.DFAReporting.V34.Model.CreativeAssetId)
  field(:collapsedSize, as: GoogleApi.DFAReporting.V34.Model.Size)
  field(:pushdownDuration)
  field(:audioSampleRate)
  field(:politeLoad)
  field(:audioBitRate)
  field(:windowMode)
  field(:idDimensionValue, as: GoogleApi.DFAReporting.V34.Model.DimensionValue)
  field(:alignment)
  field(:offset, as: GoogleApi.DFAReporting.V34.Model.OffsetPosition)
  field(:progressiveServingUrl)
  field(:active)
  field(:backupImageExit, as: GoogleApi.DFAReporting.V34.Model.CreativeCustomEvent)
  field(:mediaDuration)
  field(:transparency)
  field(:expandedDimension, as: GoogleApi.DFAReporting.V34.Model.Size)
  field(:hideFlashObjects)
  field(:originalBackup)
  field(:companionCreativeIds, type: :list)
  field(:role)
  field(:flashVersion)
  field(:orientation)
  field(:actionScript3)
  field(:startTimeType)
  field(:id)
  field(:horizontallyLocked)
  field(:zIndex)
  field(:detectedFeatures, type: :list)
  field(:pushdown)
  field(:streamingServingUrl)
  field(:sslCompliant)
  field(:mimeType)
  field(:frameRate)
  field(:displayType)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V34.Model.CreativeAsset do
  def decode(value, options) do
    GoogleApi.DFAReporting.V34.Model.CreativeAsset.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V34.Model.CreativeAsset do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
